﻿<%@ Page ContentType="application/rss+xml" Language="C#" Inherits="System.Web.Mvc.ViewPage<cludg.Web.ViewModels.OfferFeedModel>" %>
<%@ Import Namespace="cludg.Web.RenderHelpers" %><?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0">
<channel>
<title><%: Model.SiteName %> - Новые предложения (<%: Model.FeedOwnerName %>)</title>
<link></link>
<description>Подписка пользователя <%: Model.FeedOwnerName %> на новые предолжения</description>
<lastBuildDate><%= DateTime.Now.ToUniversalTime().ToString("r") %></lastBuildDate>
<language>ru-ru</language>
<% foreach (var offer in Model.Offers)
   { %>
	<item>
		<title><%: string.IsNullOrEmpty(offer.Title) ? "<Без темы>" : offer.Title%></title>
		<link><%: Url.RouteUrl("Default", new RouteValueDictionary { {"controller", "Offer"}, {"action", "Approve"}, { "id", offer.Id } }, "http", Request.Url.Host)%></link>
		<guid isPermaLink="true"><%: Url.RouteUrl("Default", new RouteValueDictionary { {"controller", "Offer"}, {"action", "Approve"}, { "id", offer.Id } }, "http", Request.Url.Host)%></guid>
		<pubDate><%: offer.CreationTime.ToUniversalTime().ToString("r") %></pubDate>
		<description><% Response.Write("<![CDATA["); %><% Html.StorySubject(offer.Subject); %><br/><% Response.Write(offer.Comment); %><% Response.Write("]]>"); %></description>
		<author><%: offer.Author == null ? offer.AnonymouseAuthorName : offer.Author.DisplayName %></author>
	</item>
<% } %>
</channel>
</rss>